<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>



    <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title><?php echo ($seo_title); ?></title>
<meta name="keywords" content="<?php echo ($seo_keywords); ?>" />
<meta name="description" content="<?php echo ($seo_description); ?>" />


<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">

<!-- No Baidu Siteapp-->
<meta http-equiv="Cache-Control" content="no-siteapp"/>

<link rel="icon" type="image/png" href="/Statics/Home/img/favicon.png">

<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="/Statics/Home/img/app-icon72x72@2x.png">

<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="PLAZOTTA"/>
<link rel="apple-touch-icon-precomposed" href="/Statics/Home/img/app-icon72x72@2x.png">

<!-- Tile icon for Win8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="/Statics/Home/img/app-icon72x72@2x.png">
<meta name="msapplication-TileColor" content="#0e90d2">


    <link rel="stylesheet" href="/Statics/Home/css/amazeui.min.css">
<link rel="stylesheet" href="/Statics/Home/css/reset.css">
<link rel="stylesheet" href="/Statics/Home/css/common.css">
<link rel="stylesheet" href="/Statics/Home/css/button.css">

<link rel="stylesheet" href="/Statics/Home/js/sco/css/scojs.css" />




</head>
<body>
<div class="am-g new-top am-padding-xs">


    <div class="am-fl am-padding-horizontal-sm">
        <a href="/"> <img class="am-margin-right-xs" src="/Statics/Home/img/top-icon.png" width="20px"  alt="">济美坊布锦画</a>
       </div>
    <div class="am-fr am-padding-horizontal-sm">
        <!--<i class="am-icon-search am-margin-right-xs" onclick="$('.search').slideToggle();"></i>-->
        <a   href="/Home/Product/cate"><i class="am-icon-search am-margin-right-xs" ></i></a>
        <!--<a class="am-margin-right-xs" href="<?php echo U('User/Favorite/index');?>">收藏</a>-->
        <a class="am-margin-right-xs" href="/Product/cate">筛选</a>
        <a class="" href="<?php echo U('User/Zuji/index');?>">我的记录</a>
    </div>


</div>

<div class="am-g  search am-padding-top-xs" style="display: none">


    <div class="am-u-sm-12">

        <form   method="get" action="<?php echo U('Product/index');?>" class=" " data-am-validator>




            <div class="am-form-group am-form-icon am-margin-0 ">
                <input type="text" class="am-form-field am-input-sm " value="<?php echo I('get.keyword');?>" name="keyword" placeholder="">
                <span class="am-icon-search  "></span>
            </div>


        </form>
    </div>








</div>


<div class="am-g ">

    <a href="<?php echo ($_data["thumb"]); ?>"><img src="<?php echo ($_data["thumb"]); ?>" class="am-img-responsive" id="product_thumb" style="width: 100%" ></a>

</div>
<?php if($_data['kucun']): ?><div class="am-g am-padding-horizontal-sm">





    <div class=" prdocut-title am-padding-sm">

        <h3 class="am-margin-0 ">

            <?php if($qinfo): ?>济美坊荣誉出品  作品名:《 <?php echo ($_data["title"]); ?>》
                <?php else: ?>    作品名:《 <?php echo ($_data["title"]); ?>》<?php endif; ?>

        </h3>



    </div>



    <div class=" am-padding-horizontal-xs common-border-bottom am-cf">
        <div class="am-u-sm-8">
        <?php if($u[vip]): ?><span class="am-text-f60 am-text-xl " > ￥ <span id="price_huiyuan" ><?php echo ($_data["price_huiyuan"]); ?></span>

            <span class="am-badge am-badge-warning am-round">VIP</span>

            </span>

            <del id="price" class="am-text-sm">原价:<?php echo ($_data["price"]); ?></del>
            <?php else: ?>

            <span class="am-text-f60 am-text-xl " > ￥ <span id="price" ><?php echo ($_data["price"]); ?></span></span>

            <span class="am-text-sm am-text-333">会员价 <span id="price_huiyuan">￥<?php echo ($_data["price_huiyuan"]); ?></span></span><?php endif; ?>

</div>
        <?php if(!$u[vip]): ?><div class="am-u-sm-4 am-padding-top-sm am-text-sm"><a href="/Vote/show.html?id=1" class="am-text-danger  ">做问卷，享折扣</a>


        </div><?php endif; ?>

    </div>

    <div class="am-cf am-margin-xs  am-text-999 am-text-xs common-border-bottom am-padding-bottom-xs ">

        <div class="am-u-sm-5">

            运费:免运费


        </div>
        <div class="am-u-sm-7 am-text-right"> <?php echo F('Var_chicun')[$_data[chicuns][0]][name];?></div>





    </div>




</div>





<div class="am-g am-padding-horizontal-sm">


<div class="am-u-sm-12  common-border-bottom common-border-top am-margin-top-sm am-padding-sm  " id="cs_list_do" data-am-collapse="{parent: '#accordion', target: '#cs_list'}">

    <span class="am-fl">请选择尺寸外框类型</span>
    <span class="am-fr am-icon-angle-right"></span>


</div>

<div class=" am-u-sm-12 common-border-bottom am-panel-collapse am-collapse    " id="cs_list" >

    <div class="  am-padding-bottom-sm " >


        <span class="am-margin-top-sm am-margin-left-sm am-block">颜色分类</span>



        <div class="am-btn-group doc-js-btn-1  am-padding-horizontal-sm" >



            <?php if(is_array($_data[colors])): $i = 0; $__LIST__ = $_data[colors];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><a class= "am-btn-default  am-btn <?php echo ($default["color_name"]); ?> am-btn-xs  am-padding-horizontal-lg am-margin-top-xs
                  <?php echo ($default["color_name"]); ?>

                  am-margin-right-xs cs_btn" href="" data-field="color" data-value="<?php echo ($v); ?>"><?php echo ($v); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>

        </div>
    </div>
    <div class="  am-padding-bottom-sm  " >

        <span class="am-margin-top-sm  am-margin-left-sm am-block">尺寸</span>

        <div class="am-btn-group doc-js-btn-1  am-padding-horizontal-sm" data-am-button>

            <?php if(is_array($_data[chicuns])): $i = 0; $__LIST__ = $_data[chicuns];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><a class= "am-btn-default  am-btn <?php echo ($default["chicun_name"]); ?>  am-btn-xs  am-padding-horizontal-lg am-margin-top-xs
                  <?php echo ($default["chicun_name"]); ?>
                am-margin-right-xs cs_btn" href="" data-field="chicun" data-value="<?php echo ($v); ?>">  <?php echo F('Var_chicun')[$v][name];?></a><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>




    </div>
    <div class="  am-padding-bottom-sm" >

        <span class="am-margin-top-sm  am-margin-left-sm am-block">外框</span>

        <div class="am-btn-group doc-js-btn-1  am-padding-horizontal-sm" data-am-button>

            <?php if(is_array($_data[waikuangs])): $i = 0; $__LIST__ = $_data[waikuangs];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><a class= "am-btn-default  am-btn  <?php echo ($default["waikuang_name"]); ?>  am-btn-xs  am-padding-horizontal-lg am-margin-top-xs
                 am-margin-right-xs cs_btn" href="" data-field="waikuang" data-value="<?php echo ($v); ?>">  <?php echo F('Var_waikuang')[$v][name];?></a><?php endforeach; endif; else: echo "" ;endif; ?>

        </div>




    </div>

</div>


<input type="hidden" name="color" value="<?php echo ($default["color"]); ?>">
<input type="hidden" name="chicun" value="<?php echo ($default["chicun"]); ?>">
<input type="hidden" name="waikuang" value="<?php echo ($default["waikuang"]); ?>">
<input type="hidden" name="id" value="<?php echo I('get.id');?>">
<input type="hidden" name="cs_id" value="<?php echo ($cs_id); ?>">
<input type="hidden" name="jump" value="1">

</div><?php endif; ?>
<div class="  am-margin-top-sm ">


    <div data-am-widget="tabs" class="am-tabs am-tabs-d3 am-margin-0" style="overflow: hidden">
        <ul class="am-tabs-nav am-cf am-bg-fff ">
            <li class="am-active"><a href="[tuwen]">商品详情</a></li>
            <li class=""><a href="[canshu]">评价</a></li>
            <li class=""><a href="[liuyan]">咨询</a></li>
            <li class=""><a onclick="location.href='/wenti';return false;">疑问解答</a></li>

        </ul>
        <div class="am-tabs-bd am-bg-fff  ">
            <div tuwen class="am-tab-panel am-active product_content">

                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">作品名</div>
                    <div class="am-u-sm-8"><?php echo ($_data["title"]); ?></div>


                </div>


                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">品牌</div>
                    <div class="am-u-sm-8">

                        <?php echo F("Var_brand")[$_data['brand']][name];?>



                    </div>


                </div>


                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">库存</div>
                    <div class="am-u-sm-8">

                        <?php echo ($_data["kucun"]); ?>

                    </div>


                </div>


                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">外框尺寸</div>
                    <div class="am-u-sm-8">

                        <?php if(is_array($_data[chicuns])): $i = 0; $__LIST__ = $_data[chicuns];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i; echo F('Var_chicun')[$v][name];?>&nbsp;<?php endforeach; endif; else: echo "" ;endif; ?>



                    </div>


                </div>



                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">类型</div>
                    <div class="am-u-sm-8"> <?php echo F(Var_fengge)[$_data["fengge"]][name];?></div>


                </div>


                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">制作工艺</div>
                    <div class="am-u-sm-8"> <?php echo F(Var_gongyi)[$_data["gongyi"]][name];?></div>


                </div>

                <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                    <div class="am-u-sm-4 am-text-666">位置</div>
                    <div class="am-u-sm-8"><?php echo ($_data["address"]); ?></div>


                </div>


                <?php if($qinfo): if($qinfo['goumairen']): ?><div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                            <div class="am-u-sm-4 am-text-666">购买人</div>
                            <div class="am-u-sm-8"><?php echo (str_cut($qinfo["goumairen"],1,'**')); ?></div>


                        </div>

                        <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                            <div class="am-u-sm-4 am-text-666">电话</div>
                            <div class="am-u-sm-8"><?php echo (substr_replace($qinfo["tel"],'****',3,4)); ?></div>


                        </div><?php endif; ?>




                    <?php else: endif; ?>










                <div class="am-cf  am-margin-vertical-sm am-padding-sm   am-padding-bottom-0 am-margin-bottom-0" id="content">
                    <?php echo ($_data["content"]); ?>
                    </div>


            </div>
            <div canshu class="am-tab-panel  am-padding-horizontal-sm am-text-sm">


                <?php if(is_array($pingjias)): $i = 0; $__LIST__ = $pingjias;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i;?><div class="am-cf  am-margin-vertical-sm am-padding-sm   ">

                        <div class="am-fl">

                            <?php if($vs['niming']): ?><i class="am-icon-user"></i>
                               匿名
                                <?php else: ?>
                                <img src="<?php echo ($vs["avatar"]); ?>" class="am-circle" width="20px" alt="">
                                <?php echo ($vs["nickname"]); endif; ?>



                        </div>
                        <div class="am-fr">
                            <span> 描述:<?php echo ($vs["miaoshu"]); ?>分</span>
                            <span> 物流:<?php echo ($vs["wuliu"]); ?>分</span>
                            <span> 服务:<?php echo ($vs["fuwu"]); ?>分</span>


                        </div>

                        
                    </div>

                    <div class="am-cf  am-margin-vertical-sm am-padding-sm   common-border-bottom">

                        <p><?php echo ($vs["content"]); ?></p>

                        <p class="am-text-999 am-text-xs">尺码: <?php echo F('Var_chicun')[$vs["chicun"]][name];?>:外框: <?php echo F('Var_waikuang')[$vs["waikuang"]][name];?>   *  <?php echo ($vs["num"]); ?></p>
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>



            </div>
            <div liuyan class="am-tab-panel  am-text-sm" style="padding: 1em 0">


                <div class="am-cf am-padding-horizontal-lg am-padding-vertical-sm" style="background:#eee">
                    <form method="post" class="am-form am-form-horizontal  J_ajaxForm " action="<?php echo U('Index/liuyan');?>">


                    <h3>我要留言:</h3>

                        <div class="am-form-group common-border-bottom">
                    <textarea name="title" rows="3" placeholder="您输入的字数不要超过60个字。" maxlength="60"></textarea>

</div>
                        <input type="hidden" name="p_id" value="<?php echo ($_data["id"]); ?>">

                        <input type="hidden" name="p_title" value="<?php echo ($_data["title"]); ?>">
                        <!--<div class=" am-form-group">-->
                            <!--<input type="tel" name="tel" value="">-->
                        <!--</div>-->

                        <div class="am-form-group ">

                            <button class="am-btn    am-btn-danger am-btn-block ajax-post"   target-form="J_ajaxForm" type="submit"> 确定</button>


                        </div>




                        </form>





                </div>



                <?php if(is_array($liuyans)): $i = 0; $__LIST__ = $liuyans;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i;?><div class="am-cf  am-padding-horizontal-lg am-padding-top-sm   common-border-bottom">

                        <p class="am-text-warning"><span class="am-text-sm">问:<?php echo ($vs["title"]); ?> </span>  <span class="am-text-xs am-text-ccc"><?php echo ($vs["date"]); ?></span></p>

                        <p class="am-text-999 am-text-xs">
                            <?php echo ($vs["huida"]); ?>

                        </p>
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>



            </div>


        </div>
    </div>


</div>

<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-index  common-border-top "
     id="">


    <div class="product-bottom ">


        <a href="/" class="am-navbar-button first am-cf am-fl am-text-xs">
            <span class="bujinhua ">&#xe736;</span>
            <span class="am-navbar-label">首页</span>
        </a>

        <a href="<?php echo U('User/Favorite/add',array('product_id'=>I('get.id')));?>" class="am-navbar-button second am-cf  am-fl am-text-xs ajax-get">
            <span class="bujinhua">&#xe61f;</span>
            <span class="am-navbar-label">关注</span>
        </a>

        <a href="/Home/Cart/index.html" class="am-navbar-button third am-cf  am-fl am-text-xs ">
            <span class="bujinhua">&#xe600;</span>
            <span class="am-navbar-label">购物车</span>
        </a>
        <?php if($_data['kucun']): ?><div class="am-u-sm-6 am-padding-0">  <a  class="am-btn right am-btn-warning   add_cart_do"  data-href="<?php echo U('addcart');?>"    >加入购物车</a>
        </div>
        <div class="am-u-sm-6 am-padding-0">  <a  class="am-btn right am-btn-danger   add_cart_do"  data-href="<?php echo U('addcart');?>"  data-jump="1">立即购买</a>
        </div>


        <?php else: ?>
            <div class="am-u-sm-12 am-padding-0">  <a  href="<?php echo U('Home/Index/auth');?>" class="am-btn right am-btn-warning   "    >关注公众号</a>
            </div><?php endif; ?>







    </div>




</div>



<!--[if lt IE 9]>
<script src="/Statics/Home/js/jquery.11.1.js"></script>
<script src="/Statics/Home/js/modernizr.js"></script>
<script src="/Statics/Home/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/Statics/Home/js/jquery.min.js"></script>
<!--<![endif]-->
<script src="/Statics/Home/js/amazeui.min.js"></script>




<script src="/Statics/Home/js/sco/js/sco.message.js"></script>
<script src="/Statics/Home/js/common.js"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>


    wx.config({
                debug: false,
                appId: '<?php echo ($jssign["appId"]); ?>',
                timestamp: '<?php echo ($jssign["timestamp"]); ?>',
            nonceStr: '<?php echo ($jssign["nonceStr"]); ?>',
            signature: '<?php echo ($jssign["signature"]); ?>',
            jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage']
    });

    var imgUrl='<?php echo ($imgUrl); ?>';
    var timeLineLink= '<?php echo ($timeLineLink); ?>';
    var tTitle= "<?php echo ($tTitle); ?>";
    var tContent= "<?php echo ($tContent); ?>";


    wx.ready(function () {



        wx.onMenuShareTimeline({
            title: tTitle, // 分享标题
            link:  timeLineLink, // 分享链接
            imgUrl:  imgUrl, // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });

        wx.onMenuShareAppMessage({
            title:  tTitle, // 分享标题
            desc:  tContent, // 分享描述
            link:  timeLineLink, // 分享链接
            imgUrl:  imgUrl, // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });



    }, false);

</script>






<script>

    $(function(){

//
        $(".add_cart_do").click(function(){

            var v_cs_id= $("input[name='cs_id']").val();

            jump=$(this).data("jump");



            console.log(v_cs_id);

            if(v_cs_id==''){



                $("#cs_list").collapse('open');
                $("#cs_list_do").addClass("am-text-f60");
                $.scojs_message("请选择尺寸外框类型", $.scojs_message.TYPE_ERROR);

                var $w = $(window);
                $w.smoothScroll({position: 500});



                return false;





            }

            var data = {
                cs_id:v_cs_id,
                jump:jump,
            };



            $.ajax({
                type: "GET",
                url: $(this).data('href'),
                data: data,
                success: function(data){


                    if (data.status == '1') {

                        $.scojs_message(data.info, $.scojs_message.TYPE_OK);


                        setTimeout(function(){
                            if (data.url) {
                                location.href=data.url;
                            }
                        },500);


                    }else{

                        $.scojs_message(data.info, $.scojs_message.TYPE_ERROR);
                    }

                }

            });



            return false;


        })
   $("#content img").click(function(){


        src=$(this).attr("src");

        location.href=src;


    })






    $("#content img").click(function(){


            src=$(this).attr("src");

            location.href=src;


        })



        $("#cs_list .cs_btn").click(function () {

            var field =$(this).data("field");
            var value =$(this).data("value");




            $(this).parent().find(".cs_btn").removeClass("am-btn-hong");



            if($(this).hasClass("am-disable")){

                return false;
            }

            if(value==$("input[name="+field+"]").val()){

                $(this).removeClass("am-btn-hong");

                $("input[name="+field+"]").val("");
                console.log("121");


            }else{
                $(this).addClass("am-btn-hong");

                $("input[name="+field+"]").val(value);

            }

            var v_chicun= $("input[name='chicun']").val();
            var v_waikuang= $("input[name='waikuang']").val();


            $.post("<?php echo U('get_cs',array('id'=>I('get.id')));?>",{chicun:v_chicun,waikuang:v_waikuang},function(data){



                if(data.cs_id!=null){

                    $("input[name='cs_id']").val(data.cs_id);





                    if(data.thumb != null){
                        $("#product_thumb").attr("src",data.thumb);

                    }


                    if(data.price != null){
                        $("#price").html(data.price);
                        $("#price_huiyuan").html(data.price_huiyuan);

                    }

                    var $w = $(window);
                    $w.smoothScroll();



                }









                $.each(data.cs, function (key, v) {


                    if(v==1){



                        $("[data-value="+key+"]").removeClass("am-disabled");




                    }else{

                        $("[data-value="+key+"]").addClass("am-disabled");

                    }





                })
            })



            return false;


        })




    })


</script>
</body>
</html>